// components/bargainTipModal/bargainTipModal.js
Component({
  options: {
    multipleSlots: false // 在组件定义时的选项中启用多slot支持
  },

  data: {
    // 弹窗显示控制
    isShow: false,
    showModal: true,
    priceArr:[2.2]
  },
  methods: {
    hideDialog() {
      this.setData({
        isShow: false,
        showModal:false
      })
    },
    closeTip(){
      let tempArr = this.data.priceArr;
      tempArr.pop();
      this.setData({ priceArr: tempArr });
      if (tempArr.length==0) this.hideDialog();
    },
    //增加一条提示
    showTip(price) {
      if (!this.data.isShow){
        this.setData({ isShow: true, showModal:true });
      }
      let tempArr = this.data.priceArr;
      // tempArr.push(price);
      // this.setData({ priceArr: tempArr});
    }
  }
})